Ext.define('extjs6test.model.core.Jurisdiction', {
    extend: 'Ext.data.TreeModel',
    requires: [
        'extjs6test.proxy.JurisdictionProxy'
    ],
    idProperty: 'id',
    proxy: "juriproxy",
    fields: [
        {name: 'juriCode', type: 'string', mapping: 'juriCode'},
        {name: 'juriName', type: 'string', mapping: 'juriName'},
        {name: 'juriLevel', type: 'int', mapping: 'juriLevel'},
        {name: 'juriParentId', type: 'string', mapping: 'juriParentId'},
        {name: 'parentJuri.juriName', type: 'string', mapping: 'parentJuri.juriName'},
        {name: 'parentJuri.juriCode', mapping: 'parentJuri.juriCode'},
        {name: "parentJuri.juriFullCode", mapping: 'parentJuri.juriFullCode'},
        {name: 'leaf', type: 'bool', defaultValue: true, mapping: 'leaf'},
        {name: 'juriFullCode', type: 'string', mapping: 'juriFullCode'},
        {name: 'id', type: 'string', mapping: 'id'},
        {name: 'text', type: 'string', mapping: 'juriName'}
    ]
});

